kind: Service
apiVersion: v1
metadata:
  name: {{ include "openresty-art.fullname" . }}-svc
spec:
  type: {{ .Values.service.type }}
  ports:
    - port: {{ .Values.service.port }}
      targetPort: 80
      {{- if .Values.service.name }}
      name: {{ .Values.service.name }}
      {{- end }}
      {{- if and (eq .Values.service.type "NodePort") .Values.service.nodePort }}
      nodePort: {{ .Values.service.nodePort }}
      {{- end }}
  selector:
    {{- include "openresty-art.selectorLabels" . | nindent 4 }}
